<!--
 * @Author: your name
 * @Date: 2020-06-28 11:50:32
 * @LastEditTime: 2020-07-07 14:29:13
 * @LastEditors: Please set LastEditors
 * @Description: 搜索框
 * @FilePath: \mobile_project\src\pages\home\components\search.vue
--> 
<template>
  <div class="search">
    <van-search @focus="focus" show-action placeholder="请输入搜索关键词" >
      <template #action>
          <!-- 消息中心 -->
          <router-link to="/message"><div class="msg"><van-goods-action-icon icon="chat-o" badge="2"/></div></router-link>
      </template>
    </van-search>
  </div>
</template>

<script>
export default {

  methods:{
    focus(){
      this.$router.push({ path: '/searchPage' })
    }
  }
};
</script>

<style lang="scss" scoped>
@import "@/style/home/search.scss"
</style>